Array - How do I access value at specified key, without using $array['key'] method?

Posted by codemonkey613 on Stack Overflow See other posts from Stack Overflow or by codemonkey613
Published on 2010-03-13T15:56:38Z Indexed on 2010/03/13 16:05 UTC
Read the original article Hit count: 388

Filed under:

For example:

$fruits = array(
    1 => 'apples',
    2 => 'lemons',
    3 => 'bananas'
);

Is there a function to output lemons, without using $fruits[2]?

© Stack Overflow or respective owner

Related posts about php